Skip to content

core: malformed cade should stop cascading#17

Merged
atagen merged 1 commit into
nextfrom
fix/malformed-cade-caps-cascade
Jun 4, 2026
Merged

core: malformed cade should stop cascading#17
atagen merged 1 commit into
nextfrom
fix/malformed-cade-caps-cascade

Conversation

@atagen
Copy link
Copy Markdown
Contributor

@atagen atagen commented Jun 3, 2026

No description provided.

@atagen atagen force-pushed the fix/malformed-cade-caps-cascade branch 6 times, most recently from dcea85c to a38495d Compare June 4, 2026 05:29
When walking the ancestor chain, a `.cade` that fails to parse now caps
the cascade at that dir instead of being silently climbed past to a valid
parent. This keeps the chain-shape decision aligned with activation, which
re-reads the same file via `config_keywords` and surfaces the parse error
there: without the cap, chain construction would build a shape that quietly
ignored a broken `.cade`, then activation would fail (or compose a parent
the user never expected) on the very same file.

The cap reuses the single per-dir parse already performed for `disinherit`
detection (`caps_the_cascade`), so no extra read is introduced. Behavior is
identical to disinherit's cap: the malformed dir itself still joins as the
chain root (its error surfaces at load), and gap-fill anchors on it without
ever reaching above.

Split out of the disinherit feature commit so this policy change lands with
its own rationale and tests.
@atagen atagen changed the base branch from main to next June 4, 2026 05:30
@atagen atagen force-pushed the fix/malformed-cade-caps-cascade branch from a38495d to 15fdc66 Compare June 4, 2026 05:32
@atagen atagen merged commit 6b2d783 into next Jun 4, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant